﻿using Crawler.IRepositories.DefaultApp;
using Model.DefaultApp;
using System.Linq;
using System;
using System.Collections.Generic;
using System.Text;
using SqlSugar;

namespace Crawler.Framework.Repositories.DefaultApp
{
    public class DefaultPageInfoRepository : Repository<DefaultPageInfoModel>, IDefaultPageInfoRepository
    {
        public DefaultPageInfoRepository(SqlSugarClient context) : base(context)
        {
        }

        public DefaultPageInfoModel GetPageInfoByUrl(string url)
        {
            return context.Queryable<DefaultPageInfoModel>().Where(dp => dp.Url == url).First();
        }
    }
}
